home *** CD-ROM | disk | FTP | other *** search
/ Champak 64 / Volume 64 - JOGO DISK .iso / Games / the_best_every_day.swf / scripts / __Packages / MCSlobber.as < prev    next >
Text File  |  2008-04-10  |  965b  |  47 lines

  1. class MCSlobber extends MCObstacles
  2. {
  3.    var STRING_TYPE = "Slobber";
  4.    function MCSlobber()
  5.    {
  6.       super(this.STRING_TYPE);
  7.       this.activate();
  8.    }
  9.    function activate()
  10.    {
  11.       super.activate();
  12.       this.Etat = "Appear";
  13.       this.gotoAndStop("Appear");
  14.       this.onRollOver = this.fRemove;
  15.    }
  16.    function deactivate()
  17.    {
  18.       super.deactivate();
  19.    }
  20.    function fRemove()
  21.    {
  22.       this.deactivate();
  23.       this.Etat = "Disapear";
  24.       this.gotoAndStop("Disapear");
  25.    }
  26.    function cancelAction()
  27.    {
  28.       this.removeMovieClip();
  29.    }
  30.    function Appear()
  31.    {
  32.       if(this.Anim._currentframe == this.Anim._totalframes)
  33.       {
  34.          this.Etat = "Idle";
  35.          this.gotoAndStop("Idle");
  36.       }
  37.    }
  38.    function Disapear()
  39.    {
  40.       if(this.Anim._currentframe == this.Anim._totalframes)
  41.       {
  42.          this.cancelAction();
  43.          _global.C.removeObstacle(this);
  44.       }
  45.    }
  46. }
  47.